package com.jeesite.modules.rt.service;

import java.util.List;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeesite.common.entity.Page;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.rt.entity.RtDeviceBohao;
import com.jeesite.modules.rt.dao.RtDeviceBohaoDao;

/**
 * rt_device_bohaoService
 * @author 李寒冰
 * @version 2024-09-26
 */
@Service
public class RtDeviceBohaoService extends CrudService<RtDeviceBohaoDao, RtDeviceBohao> {
	
	/**
	 * 获取单条数据
	 * @param rtDeviceBohao
	 * @return
	 */
	@Override
	public RtDeviceBohao get(RtDeviceBohao rtDeviceBohao) {
		return super.get(rtDeviceBohao);
	}
	
	/**
	 * 查询分页数据
	 * @param rtDeviceBohao 查询条件
	 * @param rtDeviceBohao page 分页对象
	 * @return
	 */
	@Override
	public Page<RtDeviceBohao> findPage(RtDeviceBohao rtDeviceBohao) {
		return super.findPage(rtDeviceBohao);
	}
	
	/**
	 * 查询列表数据
	 * @param rtDeviceBohao
	 * @return
	 */
	@Override
	public List<RtDeviceBohao> findList(RtDeviceBohao rtDeviceBohao) {
		return super.findList(rtDeviceBohao);
	}
	
	/**
	 * 保存数据（插入或更新）
	 * @param rtDeviceBohao
	 */
	@Override
	@Transactional
	public void save(RtDeviceBohao rtDeviceBohao) {
		super.save(rtDeviceBohao);
	}
	
	/**
	 * 更新状态
	 * @param rtDeviceBohao
	 */
	@Override
	@Transactional
	public void updateStatus(RtDeviceBohao rtDeviceBohao) {
		super.updateStatus(rtDeviceBohao);
	}
	
	/**
	 * 删除数据
	 * @param rtDeviceBohao
	 */
	@Override
	@Transactional
	public void delete(RtDeviceBohao rtDeviceBohao) {
		super.delete(rtDeviceBohao);
	}

	public void delBySn(String sn) {
		RtDeviceBohao bohao = new RtDeviceBohao();
		bohao.setSn(sn);
		dao.deleteByEntity(bohao);
	}
	
}